<!--
 * @Descripttion: 
 * @version: 
 * @Author: Lome
 * @Date: 2020-04-26 11:13:21
 * @LastEditors: Lome
 * @LastEditTime: 2020-05-11 15:57:54
 -->
<template>
  <div>
    <el-button type="primary" @click="openFilesUpload">导入文件</el-button>
    <el-button type="primary" @click="openFilesUpload2">导入文件iview</el-button>
    <FilesUpload :onoff.sync="showUploadFiles"></FilesUpload>
    <FilesUpload2 :onoff.sync="showUploadFiles2"></FilesUpload2>
    <compTable
      :tableHeader="tableHeader"
      :tableData="tableData"
      @sort-events="handleSort"
      @filter-events="filterHandler"
      @click-events="handleClick"
    />
  </div>
</template>

<script>
import  compTable from './renderTest'
import FilesUpload from '@/components/UploadFiles'
import FilesUpload2 from '@/components/UploadFiles2'
 export default {
  name: '',
  components: {
    FilesUpload,
    FilesUpload2,
    compTable
  },
  data () {
    return {
      showUploadFiles:false,
      showUploadFiles2:false,
      tableData: [{uid:'123',peopleNumber:'111',source:'hh'}],
      tableHeader: [  // 表头信息，可根据minWidth修改宽度
      // eslint-disable-next-line no-irregular-whitespace
      　{ prop: 'uid', label: '订单号', minWidth: '160px' },
        {
          prop: 'peopleNumber',
          label: '人数',
          sortable: 'custom',
          minWidth: '75px'
        },
        {
          prop: 'source',
          label: '来源',
          // filters: sourceData,
          columnKey: 'sourceList',
          minWidth: '90px',
          render: (h, params) => {return h('span',{style:{color:'red'}},params.row.source)
          }
        }]
    }
  },
  mounted() {

  },
  methods: {
    handleSort(){
      console.log('handleSort')
    },
    filterHandler(){
      console.log('filterHandler')
    },
    handleClick(){
      console.log('handleClick')
    },
    openFilesUpload(){
      this.showUploadFiles = true
    },
    openFilesUpload2(){
      this.showUploadFiles2 = true
    }
    
  }
 }
</script>

<style lang='stylus'>
</style>
